<?php
namespace common\models;

use Yii;

/**
 * This is the model class for table "user_auth".
 *
 * @property string $id
 * @property string $uid
 * @property string $source
 * @property integer $source_id
 */
class UserAuth extends \yii\db\ActiveRecord
{

    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'user_auth';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [
                [
                    'uid',
                    'source',
                    'source_id'
                ],
                'required'
            ],
            [
                [
                    'uid'
                ],
                'integer'
            ],
            [
                [
                    'source'
                ],
                'string',
                'max' => 20
            ],
            [
                [
                    'source_id'
                ],
                'string',
                'max' => 32
            ]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'uid' => 'Uid',
            'source' => 'Source',
            'source_id' => 'Source ID'
        ];
    }
}
